package com.charley.icloud.admin.webapps.sysuser.controller;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.charley.icloud.admin.constant.SysTableConstants;
import com.charley.icloud.admin.utils.RandomAccountGenerator;
import com.charley.icloud.admin.webapps.sysuser.pojo.request.SysUserQuery;
import com.charley.icloud.admin.webapps.sysuser.pojo.entity.SysUserDO;
import com.charley.icloud.admin.webapps.sysuser.service.SysUserService;
import com.charley.icloud.common.response.code.BackAdminSysCode;
import com.charley.icloud.common.response.result.HttpResponseResult;
import com.charley.icloud.common.response.result.HttpResponseResultFactory;
import com.charley.icloud.common.utils.FileUtils;
import com.charley.icloud.datasource.page.PageRequest;
import com.charley.icloud.security.utils.PasswordUtils;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Slf4j
@RestController
@RequestMapping("/user")
@Tag(name = "用户控制器")
public class SysUserController {

    @Resource
    private SysUserService sysUserService;


//    @GetMapping(value = "/findPermissions")
//    @Operation(summary = "查询用户权限", description = "后台管理系统")
//    @Parameter(name = "account", description = "用户账号", required = true, in = ParameterIn.QUERY)
//    public HttpResponseResult findPermissions(@RequestParam String account) {
//        return HttpResponseResultFactory.success(sysUserService.findPermissions(account));
//    }

//    @GetMapping(value = "/findUserRoles")
//    @Operation(summary = "查询用户角色", description = "后台管理系统")
//    public HttpResult findUserRoles(@RequestParam Long userId) {
//        return HttpResult.ok(sysUserService.findUserRoles(userId));
//    }

}
